#ifndef _PDT_LINEARTRAVERSAL_H_
#define _PDT_LINEARTRAVERSAL_H_

#include "PDTTraversalIFC.h"

#define olog()  cout<<__FILE__<<":"<<__PRETTY_FUNCTION__<<":"<<__LINE__<<": "
#define elog()  cerr<<__FILE__<<":"<<__PRETTY_FUNCTION__<<":"<<__LINE__<<": "

class PDTCodeGraph;
class PDTNode;
class PDTConst;
class PDTQuantifier;
class PDTVar;

/* 
 * ===  FUNCTION  ======================================================================
 *         Name:  isUsedBefore
 *  Description:  Checks whether variable is used before being initialized
 * =====================================================================================
 */
bool isUsedBefore(PDTVar & d, bool & remove); 


/*
 * =====================================================================================
 *        Class:  PDTLinearTraversalIfc
 *  Description:  Linear traverse over a code graph
 * =====================================================================================
 */
class PDTLinearTraversalIfc : public Traversal {
    public:
    PDTCodeGraph & ocg;
    PDTLinearTraversalIfc(PDTCodeGraph & aOcg); 

    virtual Traversal::RetType traverse();
};
#endif
